package com.hoshiibuy.sys.permission.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 全站配置信息表
 * </p>
 *
 * @author Mr.Wu
 * @since 2019-04-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "SysConfig对象", description = "全站配置信息表")
public class SysConfig extends Model<SysConfig> {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "全站配置信息自增id")
	@TableId(value = "id", type = IdType.AUTO)
	private Integer id;

	@ApiModelProperty(value = "父节点id，取值于该表id字段的值")
	private Integer parentId;

	@ApiModelProperty(value = "跟变量名的作用差不多，其实就是语言包中的字符串索引，如$_LANG['cfg_range']['cart_confirm']")
	private String code;

	@ApiModelProperty(value = "该配置的类型，text，文本输入框；password，密码输入框；textarea，文本区域；select，单选；options，循环生成多选；file,文件上传；manual，手动生成多选；group，是标题分组；hidden，不在页面显示")
	private String type;

	@ApiModelProperty(value = "当语言包中的code字段对应的是一个数组时，那该处就是该数组的索引，如$_LANG['cfg_range'] ['cart_confirm'][1]；只有type字段为select,options时才有值")
	private String storeRange;

	@ApiModelProperty(value = "当type为file时才有值，文件上传后的保存目录")
	private String storeDir;

	@ApiModelProperty(value = "该项配置的值")
	private String value;

	@ApiModelProperty(value = "显示顺序，数字越大越靠后")
	private Integer sortOrder;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getParentId() {
		return parentId;
	}

	public void setParentId(Integer parentId) {
		this.parentId = parentId;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getStoreRange() {
		return storeRange;
	}

	public void setStoreRange(String storeRange) {
		this.storeRange = storeRange;
	}

	public String getStoreDir() {
		return storeDir;
	}

	public void setStoreDir(String storeDir) {
		this.storeDir = storeDir;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public Integer getSortOrder() {
		return sortOrder;
	}

	public void setSortOrder(Integer sortOrder) {
		this.sortOrder = sortOrder;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

}
